<%= form_for(@treatment) do |f| %>
  <% if @treatment.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@treatment.errors.count, "error") %> prohibited this treatment from being saved:</h2>

      <ul>
      <% @treatment.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :daily_pills %><br />
    <%= f.text_field :daily_pills %>
  </div>
  <div class="field">
    <%= f.label :until %><br />
    <%= f.date_select :until %>
  </div>
  <div class="field">
    <%= f.label :debut_date %><br />
    <%= f.date_select :debut_date %>
  </div>
  <div class="field">
    <%= collection_select(:treatment, :Drug_id, @drugs, :id, :name) %>
  </div>
  <%= hidden_field_tag(:patient_id, @patient.id) %>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
